<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
     <div>
         <span>1</span>
         <span>2</span>
         <span>3</span>
         <span>4</span>
     </div>
</body>

<style>
    div{
        /*给父级添加flex属性 */
        display: flex;
        width: 800px;
        height: 300px;
        background-color: rgba(112, 220, 203, 0.4);
        /* 默认的主轴是 x 轴 行row*/
        flex-direction: row;
        /*justify-content: 是设置主轴上子元素的排列方式*/
        /*justify-content: start;*/
        /*justify-content: end;*/
        /*居中对齐*/
        /*justify-content: center;*/
        /*平分剩余空间 */
        /*justify-content: space-around;*/
        /*先贴两边，在分配剩余空间*/
        justify-content: space-between;

}
div span{
    width: 150px;
    height: 100px;
    background-color: #eea068;
}
</style>
</html>